<template>
  <div class="inner">
  <div>
    <ol>
      <li v-for="(score, index) in scores" :key="index">
        <span class="top_score">{{score.score}}</span>
        <span class="user_name"><a href="/user/i5ting">{{score.username}}</a></span>
      </li>
    </ol>
  </div>
  <div class="panel-block"  v-if="scores.length > 0 ">
    <a  @click="$router.push('/integral')" class="button is-fullwidth">
      TOP 100  &nbsp;&nbsp;>>
    </a>
  </div>
  </div>
</template>

<script>
export default {
  name: 'basic-integral',
  data() {
    return {
      scores: [],
    }
  },
  methods: {},
  created() {
    this.$axios.getData.getScore(10).then(res => {
      this.scores = res.data.data === null ? [] : res.data.data
    })
  },
  mounted() {
    // 轮播图定时器
  }
}
</script>

<style scoped>
.inner {
  padding: 10px;
  border-radius: 0 0 3px 3px;
}
.inner ol {
  margin: 4px 0;
  list-style: none;
}
ol, ul {
  padding: 0;
  margin: 0 0 10px 25px;
}
.inner li {
  line-height: 2em;
}
.top_score {
  color: gray;
  padding: 2px;
  margin-right: 10px;
}
.user_name {
  max-width: 120px;
  white-space: nowrap;
  display: inline-block;
  vertical-align: middle;
}
.inner .user_name, a.dark, a.topic_title {
  text-overflow: ellipsis;
}
.user_name, a.dark, a.topic_title {
  overflow: hidden;
}
.panel-block {
  align-items: center;
  display: flex;
  justify-content: flex-start;
  padding: .5em .75em;
}
.button.is-fullwidth {
  display: flex;
  width: 100%;
}
.button {
  border-radius: 6px;
  /* border-bottom-right-radius: 6px; */
  margin-top: 10px;
  background-color: #91d601;
  border-width: 1px;
  cursor: pointer;
  justify-content: center;
  padding-left: 1em;
  padding-right: 1em;
  text-align: center;
  white-space: nowrap;
  color: #fff;
  font-size: 16px;
  height: 40px;
  line-height: 40px;
}
</style>
